#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<math.h>
int main()
{
    int n = 0;
    scanf("%d", &n);
    int sum = 0;
    while (n--)
    {
        double c = 0, x = 0;
        scanf("%lf", &x);
        if (sqrt(x) * sqrt(x) != (int)sqrt(x) * (int)sqrt(x))
        {
            c = sqrt(x) * 10 + 1;
        }
        else
        {
            c = sqrt(x) * 10;
        }
        printf("%d\n", (int)c);
        if (c >= 60)
            sum++;
    }
    printf("%d\n", sum);
    return 0;
}